chore(lint): enable clippy::manual_let_else#163
Open
tupe12334 wants to merge 1 commit into
Open
Conversation
Promote clippy::manual_let_else to deny, continuing the incremental clippy ratchet. The codebase currently has zero violations, so this is a guard against future verbose diverging match/if-let bindings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Promote
clippy::manual_let_elsetodenyincore/Cargo.toml([lints.clippy]), continuing the incremental clippy ratchet.Why
manual_let_elseflags divergingmatch/if letblocks that exist only to bind a value and otherwise bail (return/break/panic), suggesting the dedicatedlet ... else { ... }form. That keeps the happy path readable, states the binding + divergence once, and keeps the bound name in the enclosing scope by construction. See #162 for full rationale.Change
manual_let_else = "deny"(with a comment explaining the intent), matching the style of the surrounding lint entries.Verification
cargo clippy --all-targets→ passes, 0 violations (lands clean as a forward guard).cargo test→ all tests pass (15 tests).Closes #162
This pull request was opened by the Add lint rule → issue + PR (owned repos + my orgs) → Slack routine of moadim. cc @tupe12334